The present invention relates to methods for improving the contrast between neighboring data in digital X-ray images. More particularly, the method determines the actual contrast between neighboring digital image data and stretches each point""s intensity to the image""s dynamic range without distorting the image.
An X-ray image is typically with standard X-ray machines using film photography. In these cases the resulting X-ray image is turned into a computer file by the use of digital scanning technology. More recently, there are X-ray machines that use a bank of light-sensitive sensors for directly capturing a digital version of the X-ray image. The X-ray image is used as a medical diagnostic tool. While there are other related imagery processes that are superior, in particular CAT scans and MRI-s, X-ray images are still widely used and comprise the majority of such images and this is very likely to continue because they are comparatively inexpensive. The current invention improves the usefulness of X-ray images to doctors.
Due, in part, to practical limits involved with X-ray imaging, it is difficult to provide an image which both defines variations in density within adjacent soft tissues like lung and variations within adjacent dense tissues like bone. Variations are demonstrated by changes in intensity. Each digital image is associated with a dynamic range. Once developed (for film) or digitally rendered as a positive image, bright intensity (usually depicted as white) areas of dense matter typically occupy the high end of the dynamic range and low intensity (black) occupy the lower end of the dynamic range. While the imaging methods may indeed capture subtle variations, the intensity between such variations are not readily detectable by the human eye. This situation is further worsened when film images, traditionally transilluminated in a light box are converted to digital images and displayed on a digital display. In other words, variation within the black areas and variations within the white areas are not easily distinguished.
Accordingly, methods are known for improving the contrast in digital X-ray images, the most well-known of which is contrast stretching. Various methods for means of accomplishing contrast stretching are the subject of several issued patents.
For instance in U.S. Pat. No. 5,357,549 to Maack et al. (Maack), a technique is provided for stretching image intensity in only a particular area of interestxe2x80x94such as the lung area of a chest X-ray. Maack refers to this as dynamic range compression. Maack locates low frequency components, determines equalization factors and applies them to the image for compressing low frequency components; thus leaving the remainder of the dynamic range available for higher frequency areas of the image intensities. This approach is unable to enhance more than one image intensity area which has been selected and is of immediate interest to the diagnostician, with loss of data the other areas.
U.S. Pat. No. 5,835,618 to Fang improves on Maack using a method of dynamic range remapping for enhancing the image in both dark and bright intensity areas. This remapping or correction technique amounts to smoothing the data (such as through a low-pass filter), determining the data mean, adjusting the smoothed data to the mean, and then applying that smoothed, adjusted data to the original data. Two curves of adjusted data are provided, each offset from the mean, one of which is offset upwardly by a constant (xcex941) and one downwardly by a constant (xcex942) for establishing upper and lower thresholds and separating the data into two distinct populations. Constants xcex941, xcex942 define a range. Then, separate additive or multiplicative algorithms are applied firstly to the original data within the range, and secondly to data outside the range. For instance, in the additive option, the original data within the range is adjusted by the difference in the data""s original and mean intensity, this difference being scaled by a user-defined control parameter between 0 and 1. Then the adjusted data is scaled to the full dynamic range of the image. Data outside the range is adjusted using a different algorithm.
Unfortunately, the method of Fang treats data within and without the range differently with the result that artificial details and other distortions result, such as the creation of a discontinuity at the range boundary. Data just inside the range data just outside the range can result in very different values, distorting stronger signals. The adjusting algorithms produce these distortions whenever the smoothed image deviates from the mean of the entire image, the magnitude of the deviation affecting the magnitude of the distortion. Fang recognizes that the user can manipulate the degree of dynamic compression. However, to minimize distortion, the user must manipulate each of: the attenuation of the correction, the upward offset, and the downward offset. For instance, the larger the chosen range, then the more the distortion is minimized but also the more the subtle details are lost. A smaller range can enhance weaker signals, however, the stronger signals become badly distorted. That is to say, the process requires time and effort and experience on the part of the user to manage three parameters to try to both minimize the image distortion while maximizing the image enhancement.
Each of the above methods of image enhancement result in a loss or distortion of the original data. Loss and distortion present artifacts, which can seriously compromise a radiologist""s or other diagnostician""s interpretation of the image. Ideally, if intensity variations do exist between neighboring data in an image, the contrast between them should be maximally enhanced for detection by the diagnostician without the introduction of artifacts, and regardless of whether the intensity variations are in the light areas or the dark areas of the image.
An optimal approach should use control parameters which are independent in their nature. Interrelated variables require the user to make compromises, sacrificing one result in part so as to achieve part of another result. Unfortunately, such decisions require a user to gain expertise in the background to the technique before it could be properly implemented. Further, such control parameters need to be robust so that small changes in a given parameter result in manageable changes, do not cause wild results, and even poor choices should give xe2x80x9clivablexe2x80x9d results.
The current invention is a process of maximizing the detail between neighboring points of an image without distorting the image and without adding artificial details. Locally, all contrasts in the image are corrected in the same manner.
In the preferred embodiment, the process is applied to images where variation between neighboring points is digitally significant but the contrast is too low for the human eye to discern. Such cases include X-ray images. There is more information available in an X-ray image than one might guess. The current invention enhances this information in order to make a more revealing, processed X-ray image. The achievements of the current invention are:
improved contrastxe2x80x94for aiding visual interpretation by doctors and other diagnosticians;
good correlation of the processed image and the input imagexe2x80x94e.g. the processed image of a chest image still resembles the original chest image;
maximized detailxe2x80x94every part of the X-ray image, is maximized for maximum possible visibility, contrast being improved between subtle variations within dark regions and within light regions;
automation of the image enhancementxe2x80x94thus it does not require the end user to have prior image enhancement experience; and
avoiding distortions and artificial detailsxe2x80x94thus avoiding addition of false information to the already challenging task of image interpretation.
In a broad aspect of the invention, an image is enhanced through the local enhancement of the contrast between neighboring point intensities by fitting a first low frequency upper curve or surface to the local maximums and fitting a second independent, and low frequency lower curve or surface to the local minimums, the space or volume between forming a fairway. The raw image data resides within the fairway. A local range between the fairway local maximum intensity and fairway local minimum intensity is extracted for each point. A local scaling factor is determined as the ratio between the local range and the dynamic range for the image. Each point is then scaled by its local scaling factor so as to maximize the variation in intensity between it and its neighboring points.
Preferably the low frequency curves are determined using a two dimensional moving average, accommodating variations in point intensities both between neighboring columns and neighboring rows.
Preferably even outlier points falling outside the fairway are enhanced, not by a distorting truncation process but, through a histogram correction which rescales the enhanced image based upon a determination of intensity range of the outliers. More specifically, the locally scaled outliers have intensities outside the image""s dynamic range and thus are temporarily stored or preserved at a higher precision.
Next, all of the data stored as high precision intensities, including outliers, are placed in a histogram having a predetermined or expanded range greater than the image""s dynamic range and large enough to capture substantially all of the outliers. A histogram count is made and a predetermined trim rate is applied to the histograms low end and top end. Because the fairway trends both large variations and small variations in intensity between neighboring points, outliers can appear outside the fairway at almost any local position in the image. As a result, the most deviant of the outliers, selected in this manner, are usually widely dispersed and thus only minimally affect the image enhancement when trimmed. The trimmed image points have a trimmed range which defines a new range having a minimum intensity and a new maximum intensity. All the points are scaled a second time, this time at a scaling factor determined as the ratio of the trimmed range and the image""s dynamic range.
Preferably the low frequency curves are determined using a two dimensional moving average and, more preferably, using filter box mean determination which markedly reduces the number of calculations required by taking the preceding filter box sums and merely subtracting the lagging point intensities and adding the leading point intensities to obtain a new filter box sum. Merely normalizing each box sum, by dividing by the sum by the number of points in the box, completes the moving average.